home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / text / faqs / sgi.faq.graphics < prev    next >
Encoding:
Internet Message Format  |  1994-05-07  |  67.6 KB

  1. Subject: SGI graphics Frequently Asked Questions (FAQ)
  2. Newsgroups: comp.sys.sgi.misc,comp.answers,news.answers
  3. From: sgi-faq@viz.tamu.edu (The SGI FAQ group)
  4. Date: 6 May 1994 06:00:22 GMT
  5.  
  6. Archive-name: sgi/faq/graphics
  7. Last-modified: Thu May  5  9:25:12 CDT 1994
  8.  
  9.     SGI graphics Frequently Asked Questions (FAQ)
  10.  
  11. This is one of the Silicon Graphics FAQ series, which consists of:
  12.  
  13.     SGI admin FAQ - IRIX system administration
  14.     SGI apps FAQ - Applications & compilers
  15.     SGI graphics FAQ - Graphics and user environment customization
  16.     SGI hardware FAQ - Hardware
  17.     SGI inventor FAQ - IRIS Inventor
  18.     SGI misc FAQ - Introduction & miscellaneous information
  19.     SGI performer FAQ - IRIS Performer
  20.     SGI pointer FAQ - Pointer to the other FAQs
  21.  
  22. Read the misc FAQ for information about the FAQs themselves.  Each FAQ
  23. is posted to comp.sys.sgi.misc and to the news.answers and comp.answers
  24. newsgroups (whose purpose is to store FAQs) twice per month.  If you
  25. can't find one of the FAQs with your news program, you can get it by
  26. anonymous FTP from one of these sites:
  27.  
  28.     rtfm.mit.edu:/pub/usenet/comp.sys.sgi.misc/
  29.     rtfm.mit.edu:/pub/usenet/news.answers/sgi/faq/
  30.     rtfm.mit.edu:/pub/usenet/comp.answers/sgi/faq/
  31.     viz.tamu.edu:/pub/sgi/faq/
  32.  
  33. Note that rtfm.mit.edu is home to many other FAQs and informational
  34. documents, and is a good place to look if you can't find an answer
  35. here. If you can't use FTP, send mail to mail-server@rtfm.mit.edu with
  36. the command 'send usenet/news.answers/ftp-list/faq' on a line by itself
  37. in the text, and it will send you a document describing how to FTP by
  38. mail. You can also read a hypertext version of the FAQs at
  39.  
  40.     http://www.cis.ohio-state.edu/hypertext/faq/usenet/sgi/top.html
  41.  
  42. The SGI FAQs are freely distributable and we encourage wide circulation.
  43. The contents are accurate as far as we know, but the usual disclaimers
  44. apply. Please send additions and changes to sgi-faq@viz.tamu.edu.
  45.  
  46. Topics covered in this FAQ:
  47. ---------------------------
  48.    -1- What books about the X Window System and OSF/Motif do you
  49.        recommend?
  50.    -2- Sun XView applications like "mailtool" hang my X server in 4.0.5.
  51.        They come up fine, but as soon as I click on them the server
  52.        freezes.
  53.    -3- Why am I getting DGL errors when I try to display a GL program?
  54.    -4- After running a few programs, the colors change as the cursor
  55.        moves. The colors are usually all wrong in other windows.
  56.    -5- How can I change my X Server to use a 12-bit PseudoColor, 12-bit
  57.        TrueColor, or 24-bit TrueColor visual by default?
  58.    -6- Why doesn't my X server use backing store? How can I turn it on?
  59.    -7- The library /usr/lib/libgl_s.a isn't on my R4000 Indigo. Where is
  60.        it?
  61.    -8- How do I run a program on one machine and display it on another?
  62.    -9- Does the DISPLAY environment variable work for GL applications?
  63.   -10- The DISPLAY variable doesn't seem to work.  Why?
  64.   -11- Can I save my screen layout?
  65.   -12- Sometimes an extra 4Dwm is running, using a lot of the CPU.  Is
  66.        this necessary?
  67.   -13- I'm running IRIX 4.0.1, and can't log in correctly. After logging
  68.        in the screen turns blue then goes back to Pandora.
  69.   -14- How do I run 'xinit' manually, (not automatically from 'xdm')?
  70.   -15- How do I start X on a remote host with no users logged in?
  71.   -16- What do the errors in my 'xdm-errors' file mean?
  72.   -17- How do I log into pandora without bringing up graphics?
  73.   -18- How do I start and stop the graphics system?
  74.   -19- How can I kill the X server without logging in or rebooting?
  75.   -20- Pandora won't come up, and /usr/adm/SYSLOG says "helvetica font
  76.        missing"
  77.   -21- How do I restart the console?
  78.   -22- What are resources?
  79.   -23- How do I set resources?
  80.   -24- How do I know what resources I can set for an application?
  81.   -25- How do I run the same program twice with different attributes?
  82.   -26- Does the GL recognize resources?
  83.   -27- How can I emulate a Meta key using xwsh?
  84.   -28- How do I find out what fonts are available?
  85.   -29- Does SGI provide any tools to help with the customization
  86.        process?
  87.   -30- What is a good approach to take in looking for resources?
  88.   -31- What is the precedence for resource files?
  89.   -32- What files affect the window manager and what is their
  90.        relationship to each other?
  91.   -33- Do I need my own .4Dwmrc file?
  92.   -34- Can I run different window managers?
  93.   -35- How do I choose a different window manager as the default?
  94.   -36- Where can I learn more about the Window Manager behavior?
  95.   -37- How do I recover from a failed window manager customization
  96.        attempt?
  97.   -38- What is the difference between .xsession and .sgisession?
  98.   -39- After copying /usr/lib/X11/xdm/Xsession to .xsession, I can't log
  99.        in.
  100.   -40- What are the important login and resource files for IRIX 4D1-4.0?
  101.   -41- What is the sequence of events that occur at login time?
  102.   -42- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
  103.        environment variable I set in my shell's startup files?
  104.   -43- Why doesn't the window manager's "Log Out" routine work?
  105.   -44- Where is the default value of PATH set?
  106.   -45- How can I convert images to & from other formats?
  107. + -46- What is the format of SGI's RGB files?
  108.   -47- Can I compress RGB bitmaps?
  109.   -48- How do I make a screen dump?
  110.   -49- Can I use 4Dgifts code in my application?
  111.   -50- What does ERR_WMANIPC mean?
  112.   -51- How can I translate screen (x,y) coords into world (x,y,z)
  113.        coords?
  114.   -52- How can I translate world (x,y,z) coords into screen (x,y)
  115.        coords?
  116.   -53- I call mapcolor(index, R, G, B) but nothing happens.  Why?
  117.   -54- What's wrong with blink()?
  118.   -55- When I try to run UIM/X uxserverd, I get an error message saying,
  119.        "license file has been modified, cannot start the UIM/X license
  120.        server".
  121.   -56- What is a GL widget?
  122.   -57- I'm using the GlxMDraw widget and it doesn't seem that colors are
  123.        being installed correctly.  Overlays in the GlxMDraw widget are
  124.        displayed in red and gray instead of the colors I specify.  What
  125.        is the problem?
  126.   -58- I get a "Broken Pipe" error when I close the window of an X
  127.        client, such as xman or xterm.  What does this error mean?  Is
  128.        there something wrong with my system?
  129.   -59- Is there a way to switch on the fly between single and double
  130.        buffering within a GL widget?
  131.   -60- Why doesn't SGI's xlock lock my screen?
  132.   -61- Why does the X server sometimes abort when I log out in IRIX
  133.        5.0.1 and IRIX 5.1?
  134. + -62- How can I get X authorization to work?
  135. + -63- Why do long resources cause X to crash mysteriously in IRIX 5.2?
  136. + -64- How can I turn off the IRIX 5.2 Magic user environment?
  137. + -65- Does the IRIX 5.2 Magic user environment display on an X
  138.        terminal?
  139.  
  140. ----------------------------------------------------------------------
  141.  
  142. Subject:    -1- What books about the X Window System and OSF/Motif do
  143.                 you recommend?
  144. Date: 07 May 93 00:00:01 EST
  145.  
  146. Introductory Texts on the X Window System
  147.  
  148. - O'Reilly and Associates Inc., "The Definitive Guides to the X Window
  149.   System", by Valerie Quercia and Tim O'Reilly. Vol.  3, "X Window
  150.   System User's Guide", Sebastopol, CA., 1988, 1989.
  151.  
  152.   Discusses being an end user of the X window system.  Covers topics
  153.   like window manages, font specifications, standard X clients and
  154.   resources.
  155.  
  156. Texts on X Window System Programming
  157.  
  158. - O'Reilly and Associates, Inc. "The Definitive Guides to the X Window
  159.   System", by Adrian Nye. Vol. 1, "Xlib Programming Manual",
  160.   Sebastopol, CA, 1990.
  161.  
  162.   Contains the introductory elements for programming with the Xlib, the
  163.   lowest level of the X window system.  Discusses concepts such as X
  164.   color capacities, windows, events, drawing primitives.
  165.  
  166. - Young, Douglas A., "X Window Systems Programming and Applications
  167.   with Xt" (OSF/Motif Edition). Prentice Hall. Englewood Cliffs, NJ.
  168.   1990.
  169.  
  170.   A thorough book starting with the basics of programming with a
  171.   toolkit though advanced topics.  Contains source code for several
  172.   small complete applications.  (Source code for this book is also
  173.   available on line in the /usr/src directory of the Motif Development
  174.   option.)
  175.  
  176. - O'Reilly and Associates Inc., "The Definitive Guides to the X Window
  177.   System", by Adrian Nye and Tim O'Reilly. Vol. 4, "X Toolkit
  178.   Intrinsics Programming Manual", Sebastopol, CA., 1990.
  179.  
  180.   Another reference for programming with the OSF/Motif toolkit.  Covers
  181.   topics including basic programming, widgets, resources, and more
  182.   advanced topics.
  183.  
  184. Reference Texts for the X Window System :
  185.  
  186. - O'Reilly and Associates Inc., "The Definitive Guides to the X Window
  187.   System", by Adrian Nye. Vol. 2, "Xlib Reference Manual", Sebastopol,
  188.   CA., 1988.
  189.  
  190.   Complete reference for Xlib library routines.
  191.  
  192. - Scheifler, Robert and James Gettys, X Window System, Second Edition,
  193.   Digital Press, 1990.  ISBN 1-55558-050-5.
  194.  
  195.   Referred to as "the Bible" of Xlib and X Protocol reference.
  196.  
  197. Reference Texts for the OSF/Motif Toolkit :
  198.  
  199. - Open Software Foundation, "OSF/Motif Programmer's Guide". Release
  200.   1.1, Prentice Hall. Englewood Cliffs, NJ. 1990.
  201.  
  202.   Exhaustive reference of every widget in the OSF/Motif library.
  203.  
  204. - Asente, Paul J. and Ralph R. Swick. "X Window System Toolkit".
  205.   X Version 11, Release 4. Digital Press. 1990.
  206.  
  207.   Very in-depth reference to the structure and operation of
  208.   an X window system toolkit.
  209.  
  210. ------------------------------
  211.  
  212. Subject:    -2- Sun XView applications like "mailtool" hang my X server
  213.                 in 4.0.5.  They come up fine, but as soon as I click on
  214.                 them the server freezes.
  215. Date: 07 May 93 00:00:01 EST
  216.  
  217. Any XView application run under the Xsgi X11-server shipped in
  218. IRIX versions 4.0.5A through 4.0.5G will lock the X Server on 
  219. the first mouse click and will not release it until killed from 
  220. somewhere else.  Fortunately there is a workaround:
  221.  
  222. a) Run the application with '-Wfsdb' on the command line.
  223.    Alternatively you could use '-fullscreendebug'.  For example:
  224.  
  225.    % mailtool -Wfsdb
  226.  
  227. b) If you have the sources, add
  228.  
  229.      extern int fullscreendebug;
  230.  
  231.    before main() and
  232.  
  233.      fullscreendebug = 1;
  234.  
  235.    after the xv_init() call.  This forces the program to set this flag
  236.    in any case - even when run with non-SGI X servers.  It releases you
  237.    of the danger of omitting -Wfsdb and locking your screen.
  238.  
  239. c) if the program uses the 'fullscreen' package, you might add
  240.  
  241.        Fullscreen.Debug: True
  242.  
  243.    in $HOME/.Xresources or specify this resource on the command line.
  244.    This flag currently disables grabs in both the 'window' and the
  245.    'fullscreen' package, but is only set from resources in the
  246.    'fullscreen' package.
  247.  
  248. ------------------------------
  249.  
  250. Subject:    -3- Why am I getting DGL errors when I try to display a GL
  251.                 program?
  252. Date: 20 Feb 94 00:00:01 EST
  253.  
  254. - You may be trying to display on a non-SGI machine which doesn't have
  255.   GL/DGL. (Most don't, yet.) Presently the only way around this is to
  256.   buy a third-party GL emulator for the non-SGI machine.
  257.  
  258. - DGL may be disabled in /etc/services and/or /usr/etc/inetd.conf
  259.   (/etc/inetd.conf in IRIX 5.x). The former file should have a line
  260.   reading
  261.  
  262.     sgi-dgl         5232/tcp
  263.  
  264.   and the latter should have a line reading
  265.  
  266.     sgi-dgl stream  tcp   nowait  root   /usr/etc/dgld  dgld -IM -tDGLTSOCKET
  267.  
  268.   If either is commented out, remove the comment.
  269.  
  270. - You may be trying to display on a machine with a much older version
  271.   of IRIX. Try another machine with a newer IRIX.
  272.  
  273. - You may have set the DISPLAY enviroment variable incorrectly.
  274.  
  275. - The machine on which you're displaying may have disallowed access.
  276.   Do 'xhost +yourmachine' to give 'yourmachine' access to the display.
  277.  
  278. An article in the Jan/Feb 93 Pipeline describes the above in great
  279. detail.
  280.  
  281. ------------------------------
  282.  
  283. Subject:    -4- After running a few programs, the colors change as the
  284.                 cursor moves. The colors are usually all wrong in other
  285.                 windows.
  286. Date: 07 May 93 00:00:01 EST
  287.  
  288. This is known as colormap flashing. It is caused by the server
  289. maintaining 2 separate colormaps, one for GL windows and one for X
  290. windows.  As the cursor moves around, the window manager will install
  291. the correct colormap for each window.  This will cause colors to be
  292. wrong in other windows.  For more information on colormaps and
  293. installation please see the Xlib Programming manual, chapter 7 (Vol I
  294. of the O'Reilly series).
  295.  
  296. You can sometimes avoid colormap flashing by configuring your X Server
  297. to use a 12-bit or 24-bit visual by default.
  298.  
  299. ------------------------------
  300.  
  301. Subject:    -5- How can I change my X Server to use a 12-bit
  302.                 PseudoColor, 12-bit TrueColor, or 24-bit TrueColor
  303.                 visual by default?
  304. Date: 07 May 93 00:00:01 EST
  305.  
  306. By default, the SGI X Server is configured to use an 8-bit PseudoColor
  307. visual.  X-based applications can request other visuals directly if
  308. they are available.  Alternatively, you can change the default visual
  309. by performing the following steps:
  310.  
  311. a) Run "/usr/bin/X11/xdpyinfo" and check that your server is
  312.    capable of using a 12-bit or 24-bit visual.  If it is,
  313.    you will see lines similar to the following:
  314.  
  315.    visual id, max buffers, depth:    0x28, 0, 12
  316.    visual id, max buffers, depth:    0x29, 0, 12
  317.    visual id, max buffers, depth:    0x2a, 0, 24
  318.  
  319.    The last number on each line represents the number of
  320.    bits available for that visual.
  321.     
  322. b) Log in as root
  323.  
  324. c) Edit the file /usr/lib/X11/xdm/Xservers.  By default it
  325.    will contain the string:
  326.      :0 secure /usr/bin/X11/X -bs -c -pseudomap 4sight
  327.    for a 24-bit TrueColor visual change it to:
  328.      :0 secure /usr/bin/X11/X -bs -c -class TrueColor -depth 24
  329.    for a 12-bit PseudoColor visual change it to:
  330.      :0 secure /usr/bin/X11/X -bs -c -class PseudoColor -depth 12
  331.  
  332. d) Restart your X server.  You can do this by invoking either
  333.    of the following commands:
  334.  
  335.    % killall -TERM Xsgi
  336.  
  337.    % /usr/gfx/stopgfx; /usr/gfx/startgfx
  338.  
  339. Note:  X Server visuals are an advanced topic; before making the above
  340. changes you should be aware that some 3rd-party and freeware
  341. applications might not gracefully adapt to an X Server which supplies
  342. anything but an 8-bit PseudoColor visual by default.
  343.  
  344. ------------------------------
  345.  
  346. Subject:    -6- Why doesn't my X server use backing store? How can I
  347.                 turn it on?
  348. Date: 12 Feb 94 00:00:01 EST
  349.  
  350. Mark Kilgard of SGI <mjk@hoot.asd.sgi.com> writes,
  351. SGI ships its X server with backing store disabled.  If you edit
  352. /usr/lib/X11/xdm/Xservers and remove the -bs option, then restart the X
  353. server, backing store will be available.
  354.  
  355. The reason for not turning on backing store by default is two-fold.
  356.  
  357. 1) In IRIX 4.0.X the code for managing overlay planes didn't properly
  358.    take overlays into account so backing store doesn't work if you have
  359.    overlay windows on the screen. This is fixed n IRIX 5.x.
  360.  
  361. 2) In most cases, backing store hurts your performance.  It cases ALL X
  362.    rendering operations to make an extra (small) traversal through
  363.    backing store code even if backing store isn't in use.  Also when
  364.    backing store is in use, it tends to grow the X server since a large
  365.    amount of memory can easily be used to maintain backing store.
  366.  
  367. One alternative to backing store is to render your image to a pixmap
  368. and then blit from the pixmap to the screen in response to expose
  369. events.  This will stress the X server a great deal less than using
  370. backing store.  Additionally, make sure you are compressing expose
  371. events when you redraw.
  372.  
  373. ------------------------------
  374.  
  375. Subject:    -7- The library /usr/lib/libgl_s.a isn't on my R4000 Indigo.
  376.                 Where is it?
  377. Date: 07 May 93 00:00:01 EST
  378.  
  379. It's in the "maint" software, in the maint_gl_x_dev package.
  380.  
  381. ------------------------------
  382.  
  383. Subject:    -8- How do I run a program on one machine and display it on
  384.                 another?
  385. Date: 07 May 93 00:00:01 EST
  386.  
  387. Use the DISPLAY environment variable to specify the remote host on
  388. which you want the X client to be displayed; then invoke the
  389. appplication.
  390.  
  391. To specify the remote host,
  392.  
  393.   setenv DISPLAY <destination>:0
  394.  
  395. where <destination> is the name or IP address of the remote host.
  396. To specify the local host (console),
  397.  
  398.   setenv DISPLAY :0
  399.  
  400. ------------------------------
  401.  
  402. Subject:    -9- Does the DISPLAY environment variable work for GL
  403.                 applications?
  404. Date: 07 May 93 00:00:01 EST
  405.  
  406. Yes.  Iris GL programs display on the machine specified by the DISPLAY
  407. environment variable.  This occurs because the GL now uses the
  408. Distributed Graphics Library (DGL) capabilities by default.  It is
  409. important to remember that only Silicon Graphics' machines can display
  410. GL.  For networks running NIS (formerly yellow pages), it is sometimes
  411. necessary to add the flag "-lsun" when compiling.
  412.  
  413. ------------------------------
  414.  
  415. Subject:   -10- The DISPLAY variable doesn't seem to work.  Why?
  416. Date: 07 May 93 00:00:01 EST
  417.  
  418. There are several possibilities.  First, check your DISPLAY variable to
  419. make sure it is syntactically correct.  For example, to display
  420. applications on a machine named "enterprise" whose IP address is
  421. 123.45.678.90, it should be set to "enterprise:0" or
  422. "123.45.678.90:0".
  423.  
  424. Also, try to "ping" the machine to which your DISPLAY variable is set.
  425. If this does not work, you have either specified an invalid hostname,
  426. the host is down, or you are having network problems.
  427.  
  428. Sometimes, when trying to display to a remote server, you see messages
  429. like "permission denied" or "can't connect to server".  To solve
  430. permission problems, you need to disable access control on the remote
  431. server using the xhost command.  By default, access control is disabled
  432. on Silicon Graphics' machines.
  433.  
  434. For more information see Chapter 3 of the X Window System User's Guide,
  435. (Vol. 3 of the O'Reilly series)
  436.  
  437. If NIS is used, make sure the client is linked with "-lsun".
  438.  
  439. ------------------------------
  440.  
  441. Subject:   -11- Can I save my screen layout?
  442. Date: 07 May 93 00:00:01 EST
  443.  
  444. Not very easily.  You must run "xwininfo" to find the X and Y position
  445. of each window, then use that information to customize your .sgisession
  446. or .xsession files.
  447.  
  448. For more information see Chapter 3 of the X Window System User's Guide,
  449. (Vol. 3 of the O'Reilly series)
  450.  
  451. There are two tools that may help: 'xtoolplaces', which was posted to
  452. volume 14 of comp.sources.x
  453. (ftp.uu.net:/usenet/comp.sources.x/volume14/xtoolplaces/), and David
  454. Hinds' 'xscript', which is at cb-iris.stanford.edu:/pub/.
  455.  
  456. ------------------------------
  457.  
  458. Subject:   -12- Sometimes an extra 4Dwm is running, using a lot of the
  459.                 CPU.  Is this necessary?
  460. Date: 07 May 93 00:00:01 EST
  461.  
  462. No, there should only be one.  This multiple window manager problem
  463. usually is triggered by the "kill" feedback of the window manager when
  464. a user logs out.  The workaround for the problem is to remove the
  465. "kill" feedback.
  466.  
  467. The "kill" feedback is controlled by the resource "showFeedback."  For
  468. 4Dwm, this resource is defined in /usr/lib/X11/app-defaults/4DWm as:
  469.  
  470.   *showFeedback:       behavior restart quit kill
  471.  
  472. Modify the resource to read:
  473.  
  474.   *showFeedback:       behavior restart quit
  475.  
  476. For mwm, set a "showFeedback" resource that does not include the "kill"
  477. feedback in /usr/lib/X11/app-defaults/Mwm.  A sample setting is:
  478.  
  479.   Mwm*showFeedback:  move placement resize behavior restart quit
  480.  
  481. ------------------------------
  482.  
  483. Subject:   -13- I'm running IRIX 4.0.1, and can't log in correctly.
  484.                 After logging in the screen turns blue then goes back to
  485.                 Pandora.
  486. Date: 07 May 93 00:00:01 EST
  487.  
  488. The problem is caused by an incorrect shutdown.  When you log out, xdm
  489. runs /usr/sbin/gamma and writes the current value to
  490. /etc/config/system.glGammaVal.  IRIX buffers this data in main memory
  491. in the buffer cache.  If the system is powered off right after logout,
  492. the data is not written to the file.
  493.  
  494. a) Login to your system as root, either via the network or
  495.    by taking the machine down to single-user mode.
  496.  
  497. b) enter these commands at the # prompt:
  498.  
  499.    # cd /etc/config
  500.    # cat system.glGammaVal
  501.  
  502. If the cat command returns a value of 1.7000, contact your technical
  503. support provider for additional troubleshooting.  If the command
  504. returns nothing (empty file) or "0", it means the problem can be fixed
  505. by entering the following command:
  506.  
  507.   # /bin/rm system.glGammaVal
  508.   # /bin/echo "1.7" > system.glGammaVal
  509.  
  510. Check your work:
  511.  
  512.   # cat system.glGammaVal
  513.  
  514. The command above should now return 1.7.
  515.  
  516. Your login should now be successful. If you edited the file while
  517. Pandora was running, you'll find the first login attempt will fail, but
  518. any later attempts will be successful. After the first login attempt,
  519. Pandora will read in the correct gamma value.
  520.  
  521. ------------------------------
  522.  
  523. Subject:   -14- How do I run 'xinit' manually, (not automatically from
  524.                 'xdm')?
  525. Date: 07 May 93 00:00:01 EST
  526.  
  527. Note that this change would affect all users.
  528.  
  529. 1) log in as root
  530. 2) Type:
  531.    /usr/gfx/stopgfx
  532.    chkconfig xdm off.
  533. 3) all users need to copy /usr/bin/X11/X to their home directory
  534.    (renaming the file to .xserverrc), removing the if test for
  535.    windowsystem, OR be familiar enough with xinit to have an alternate
  536.    command line.
  537. 4) transfer all startup programs from .xsession/.sgisession to .xinitrc.
  538. 5) the last program to start from .xinitrc must not exit.  When this
  539.    one exits, the session terminates.
  540.  
  541. ------------------------------
  542.  
  543. Subject:   -15- How do I start X on a remote host with no users logged
  544.                 in?
  545. Date: 07 May 93 00:00:01 EST
  546.  
  547. This example starts up an xclock on the remote system.  The easy way to
  548. test this for now is to rlogin to the system and type the commands.
  549. Once something works you can write some shell scripts and use rsh to
  550. run them:
  551.  
  552. hydra is being used to login to oscar and start graphics on oscar.
  553. oscar is displaying the pandora login when this is done:
  554.  
  555. hydra 2% rlogin oscar -l root
  556. oscar 1# /usr/gfx/stopgfx     (screen blanks)
  557. oscar 2# chkconfig windowsystem on
  558. oscar 3# setenv DISPLAY :0.0  (display on local screen)
  559. oscar 4# /usr/bin/X11/X &  (start Xsgi)
  560. oscar 5# xclock &  (clock is displayed)
  561.  
  562. To clean up:
  563.  
  564. oscar 6# /usr/gfx/stopgfx     (screen blanks)
  565. oscar 7# /usr/gfx/startgfx  (re-start pandora)
  566.  
  567. ------------------------------
  568.  
  569. Subject:   -16- What do the errors in my 'xdm-errors' file mean?
  570. Date: 07 May 93 00:00:01 EST
  571.  
  572. It depends on the error message, obviously.  Some are:
  573.  
  574.   unable to load display mode, rnid = 196614, errno = 22
  575.   Failed to unbind rn from clip, rnid = 3,errno = 22
  576.   bogus window id in rrm request type(2)
  577.  
  578. These are messages related to the communication between the rrm layer
  579. in the kernel and the X server.  The messages usually occur when a GL
  580. window is being destroyed in a sequence that the X server did not
  581. expect.  They are quite benign.
  582.  
  583. ------------------------------
  584.  
  585. Subject:   -17- How do I log into pandora without bringing up graphics?
  586. Date: 07 May 93 00:00:01 EST
  587.  
  588. In IRIX 3.3 you could specify the "NOGRAPHICS" option on the login
  589. screen.  The "NOGRAPHICS" option has been replaced with the keyword
  590. "failsafe" that is typed after the users name on the login screen.
  591. However, this command no longer brings up a "textport" window without
  592. graphics.  Instead, it now starts a single xwsh on the center of the
  593. screen with no window manager.  Example login:
  594.  
  595.   login: root failsafe
  596.  
  597. ------------------------------
  598.  
  599. Subject:   -18- How do I start and stop the graphics system?
  600. Date: 07 May 93 00:00:01 EST
  601.  
  602. Use /usr/gfx/startgfx and /usr/gfx/stopgfx.  Be aware that stopgfx will
  603. kill any active windows and log you out.  Under IRIX 3.* use
  604. /etc/gl/restartgl.
  605.  
  606. ------------------------------
  607.  
  608. Subject:   -19- How can I kill the X server without logging in or
  609.                 rebooting?
  610. Date: 22 Jan 94 00:00:01 EST
  611.  
  612. Hold down the left-Control, left-Shift, F12 and keypad slash keys.
  613. This is fondly known as the "Vulcan Death Grip".
  614.  
  615. ------------------------------
  616.  
  617. Subject:   -20- Pandora won't come up, and /usr/adm/SYSLOG says
  618.                 "helvetica font missing"
  619. Date: 07 May 93 00:00:01 EST
  620.  
  621. It appears that the subsystem, "eoe2.sw.fonts" did not get loaded.
  622. Re-install the subsystem using the following sequence from 'inst':
  623.  
  624. 1) type "inst" or boot the mini-root, as documented in Section 4.5
  625.    of the "IRIS Software Installation Guide"
  626. 2) keep *
  627. 3) set neweroverride on
  628. 4) install eoe2.sw.fonts
  629. 5) exit
  630.  
  631. ------------------------------
  632.  
  633. Subject:   -21- How do I restart the console?
  634. Date: 07 May 93 00:00:01 EST
  635.  
  636. Use /usr/sbin/startconsole.  In IRIX 3.*, use /etc/gl/startconsole.
  637.  
  638. ------------------------------
  639.  
  640. Subject:   -22- What are resources?
  641. Date: 07 May 93 00:00:01 EST
  642.  
  643. Basically, resources are "attributes" that control the look and feel of
  644. an application. Resources include color, fonts, size, location, and
  645. more.  Resources can have a complex format for binding strengths.
  646.  
  647. For a complete description of resources, including a description of
  648. "loose" and "tight" bindings, consult a book listed in the bibliography
  649. question.
  650.  
  651. ------------------------------
  652.  
  653. Subject:   -23- How do I set resources?
  654. Date: 07 May 93 00:00:01 EST
  655.  
  656. There are many ways to set resources. Resources may be listed in files
  657. or contained in a data base. Consult a book on X as well as the xrdb(1)
  658. manpage for detailed descriptions.  Generally speaking, if xrdb is not
  659. used, resource files are specified through environment variables.
  660. "What is a good approach to take in looking for resources?" addresses
  661. the precedence of these files and variables.
  662.  
  663. For some examples, see the file
  664. /usr/tutor/Customize/example.Xdefaults.
  665.  
  666. ------------------------------
  667.  
  668. Subject:   -24- How do I know what resources I can set for an
  669.                 application?
  670. Date: 07 May 93 00:00:01 EST
  671.  
  672. The most common place to find resource variables for a particular
  673. application is in the man page for that application.
  674.  
  675. For example, take a look at the man page for `xwsh'.  Look for the
  676. section heading called `RESOURCES'.  This section lists each resource
  677. for `xwsh', and in some cases, the valid values for that resource.
  678.  
  679. Also, many major applications are built on top of the Xt toolkit. There
  680. are standard resources that these applications recognize. For a more
  681. complete description, see one of the books on Xt listed in the
  682. bibliography.
  683.  
  684. ------------------------------
  685.  
  686. Subject:   -25- How do I run the same program twice with different
  687.                 attributes?
  688. Date: 07 May 93 00:00:01 EST
  689.  
  690. To accomplish this task, you need to take advantage of the "instance vs
  691. class" concept. This concept is explained further in most books on Xt.
  692.  
  693. Many applications have a resource that lets you to give it a unique
  694. name.  For example, from the xwsh man page :
  695.  
  696. -name instance-name
  697.       Provide a unique name for an xwsh window.  This name becomes
  698.       the instance name of the specific xwsh, with the class name
  699.       always being "XWsh".
  700.  
  701. Using the -name option allows you to give "names" to different
  702. instances of xwsh and assign different resources to each one.  So if
  703. you want two different xwsh's with different resource sets, give them
  704. two different names, say howdymom and howdydoody, for example.  Add the
  705. following to your ~/.Xdefaults file (if you use .Xdefaults) :
  706.  
  707.   howdymom*foreground:       SeaGreen
  708.   howdydoody*foreground:     SGIBeet
  709.  
  710. Now all you have to do is start them up :
  711.  
  712.   xwsh -name howdymom&
  713.   xwsh -name howdydoody&
  714.  
  715. ------------------------------
  716.  
  717. Subject:   -26- Does the GL recognize resources?
  718. Date: 07 May 93 00:00:01 EST
  719.  
  720. Yes. In IRIX 4.0 and later, the GL responds to several X resources,
  721. allowing run-time control over some aspects of GL programs.
  722.  
  723. The man page assumes you are somewhat familiar with X resources, if you
  724. are not, you should read some X documentation such as Volume 3 of the
  725. O'Reily X books.
  726.  
  727. The GL uses resources names with the prefixes
  728.  
  729.   appname.gl.                (instance prefix)
  730.   Appname.GL.                (class prefix)
  731.  
  732. where appname and Appname are derived from the argument to the GL
  733. program's first call to winopen(3G) upper case.
  734.  
  735. For complete information see the man page for GLRESOURCES.
  736.  
  737. ------------------------------
  738.  
  739. Subject:   -27- How can I emulate a Meta key using xwsh?
  740. Date: 10 Dec 93 00:00:01 EST
  741.  
  742. Shankar Unni <shankar@wpd.sgi.com> says:
  743. In order to have "Meta" keys with xwsh, you first need to set its
  744. keyboard type to "xlib" (the "raw" keyboard). Then, you need to bind
  745. all the ALT-combinations to your taste. Here is my personal
  746. app-defaults file for XWsh:
  747.  
  748. ================== cut here ======================
  749.  
  750. XWsh*keyboardType: xlib
  751.  
  752. ! This determines what characters are treated as a "word" when doing a
  753. ! double-click. I have it set so that any character that is in a file-
  754. ! name or E-mail address (!%$*+-./@) is picked up as a word char.
  755. XWsh*CharClass:33:48,36-37:48,42-43:48,45-47:48,64:48,126:48
  756.  
  757. XWsh*keyMapping2:                \
  758.     a(Alt_L): send("\033a");             \
  759.     b(Alt_L): send("\033b");             \
  760.     [etc ...]
  761.     z(Alt_L): send("\033z");             \
  762.     A(Alt_L,Shift_L): send("\033A");        \
  763.     B(Alt_L,Shift_L): send("\033B");        \
  764.     [etc ...]
  765.     Z(Alt_L,Shift_L): send("\033Z");        \
  766.     0(Alt_L): send("\0330");             \
  767.     1(Alt_L): send("\0331");             \
  768.     [etc ...]
  769.     9(Alt_L): send("\0339");             \
  770.     period(Alt_L): send("\033.");        \
  771.     underscore(Alt_L,Shift_L): send("\033_");    \
  772.     bracketleft(Alt_L): send("\033[");        \
  773.     asterisk(Alt_L,Shift_L): send("\033*");    \
  774.     numbersign(Alt_L,Shift_L): send("\033#");    \
  775.     less(Alt_L,Shift_L): send("\033<");        \
  776.     equal(Alt_L): send("\033=");        \
  777.     greater(Alt_L,Shift_L): send("\033>");    \
  778.     Escape(Alt_L): send("\033\033");        \
  779.     BackSpace(Alt_L): send("\033\010");        \
  780.     Return(Alt_L): send("\015\001");
  781.  
  782. ================== cut here ======================
  783.  
  784. ------------------------------
  785.  
  786. Subject:   -28- How do I find out what fonts are available?
  787. Date: 07 May 93 00:00:01 EST
  788.  
  789. The xfontsel and xlsfonts utilities help you find appropriate fonts.
  790. xlsfonts lists the fonts; xfontsel provides an interface for selecting
  791. a desired font. To use xfontsel, choose "Font Names" from the
  792. Customization rollover menu in the Toolchest.  Please see the man pages
  793. and the IRIS Utilities Guide for further information.
  794.  
  795. ------------------------------
  796.  
  797. Subject:   -29- Does SGI provide any tools to help with the
  798.                 customization process?
  799. Date: 07 May 93 00:00:01 EST
  800.  
  801. Yes. The Customization rollover menu in the Toolchest contains three
  802. entries: Window Info, Color Names, and Font Names.  Please refer to the
  803. man pages on these commands for details: xfontsel, xlsfonts, xwininfo,
  804. xdpyinfo, xprop, appres, listres, and xrdb.
  805.  
  806. Also, see the "WorkSpace User's Guide" and the example files in
  807. /usr/tutor/Customize.
  808.  
  809. ------------------------------
  810.  
  811. Subject:   -30- What is a good approach to take in looking for
  812.                 resources?
  813. Date: 07 May 93 00:00:01 EST
  814.  
  815. The following is a recommended list  of steps to take when searching
  816. for a resource, binding, behavior, etc.
  817.  
  818.  1) Look in the 4.0 Transition Guide.
  819.  2) Look in /usr/tutor/Customize.
  820.  3) Look in /usr/demos.
  821.  4) Look in ~4Dgifts.  (Available with the development option.)
  822.  5) If the client you are interested in is a GL client, see the
  823.     man page for GLRESOURCES.
  824.  6) Look in /usr/lib/X11/app-defaults/ClientName.
  825.  7) Look in /usr/lib/X11/system.* .
  826.  8) Look through the man page for the client you are interested in.
  827.  9) Look in O'Reilly & Associates Vol. III. It has many gems
  828.     pertaining to standard X clients.
  829. 10) Look in the documentation that came with your application.
  830. 11) Look in the OSF Motif manuals.
  831. 12) Post to comp.windows.x if you can not find
  832.     an answer using steps 1 through 11.
  833.  
  834. ------------------------------
  835.  
  836. Subject:   -31- What is the precedence for resource files?
  837. Date: 07 May 93 00:00:01 EST
  838.  
  839. The following list indicates the weight of set resources.
  840. Items at the top have the greatest weight.
  841.  
  842. 1) Hard coded values for resources.
  843. 2) Command line arguments.
  844. 3) Resources pointed to by $XENVIRONMENT.
  845. 4) Resource values loaded into the Resource Data Base via xrdb.
  846. 5) Resources pointed to by other environment variables :
  847.  
  848.    IF $XUSERFILESEARCHPATH is set
  849.  
  850.      then it contains a list of directories to search.
  851.  
  852.    ELSE IF $XAPPLRESDIR is set
  853.     
  854.      it contains a single directory, and a short list of related
  855.      directories (e.g. adjusted for language) is where resource
  856.      files must be found.
  857.     
  858.    ELSE
  859.     
  860.      Look in a short list of places related to $HOME (e.g. language
  861.      adjusted). This includes files in $HOME that have the name of the
  862.      class of the application.
  863.  
  864. 6) Resource values set in $HOME/.Xdefaults, provided that the
  865.    RESOURCE_MANAGER property hasn't been set via the xrdb command.
  866.    (see the third paragraph in the xrdb man page)
  867. 7) Values set in /usr/lib/X11/app-defaults/*.
  868. 8) Values set through through the application's fall back mechanism.
  869.  
  870. ------------------------------
  871.  
  872. Subject:   -32- What files affect the window manager and what is their
  873.                 relationship to each other?
  874. Date: 07 May 93 00:00:01 EST
  875.  
  876. 1) ~/.4Dwmrc, if you have one
  877. 2) /usr/lib/X11/system.4Dwmrc
  878. 3) /usr/bin/X11/4Dwm
  879. 4) /usr/lib/X11/app-defaults/4Dwm
  880. 5) ~/.Xdefaults (or wherever you set resources)
  881.  
  882. When 4Dwm is started, it looks for ~/.4Dwmrc. If it does not exist, it
  883. looks at /usr/lib/X11/system.4Dwmrc. The definitions for button
  884. bindings, menus, etc are contained in these files. For a better
  885. description of bindings, look in /usr/tutor/Customize/example.4Dwmrc
  886. and /usr/people/ 4Dgifts/.4Dwmrc. Also see the man pages for 4Dwm.
  887.  
  888. The resource set for the bindings will actually "choose" which binding
  889. definition is set.
  890.  
  891. ------------------------------
  892.  
  893. Subject:   -33- Do I need my own .4Dwmrc file?
  894. Date: 07 May 93 00:00:01 EST
  895.  
  896. Not necessarily. As mentioned in the previous question, actual bindings
  897. are determined by resource names. If there is a binding definition in
  898. /usr/lib/X11/system.4Dwmrc that you like, you may choose it by setting
  899. the appropriate resource.
  900.  
  901. ------------------------------
  902.  
  903. Subject:   -34- Can I run different window managers?
  904. Date: 07 May 93 00:00:01 EST
  905.  
  906. In Irix 4D1-4.0, you may choose 4Dwm, mwm, twm, or uwm. Note that GL
  907. programs are guaranteed to work only under 4Dwm.
  908.  
  909. ------------------------------
  910.  
  911. Subject:   -35- How do I choose a different window manager as the
  912.                 default?
  913. Date: 07 May 93 00:00:01 EST
  914.  
  915. You must use a .xsession file and explicitly invoke the window manager
  916. and any other applications you want to use, such as 'toolchest' and
  917. 'xwsh'.
  918.  
  919. After making this change, you may only be able to log out by using the
  920. "Log Out" selection in the toolchest, or by executing
  921. /usr/bin/X11/endsession.
  922.  
  923. Here are the contents of a sample .xsession file:
  924.  
  925.     xhost + &
  926.     toolchest -name ToolChest > /dev/console 2&>1 &
  927.     winterm -bg red &
  928.     winterm -bg blue &
  929.     mwm > /dev/console 2&>1 &
  930.     /usr/bin/X11/reaper
  931.  
  932. Note that 'reaper' is not put into the background.  When 'reaper' exits
  933. you will be logged out.
  934.  
  935. Alternatively, you can do the following steps:
  936.  
  937. 1. cp /usr/lib/X11/xdm/Xsession ~/.xsession
  938.  
  939. 2. Remove the lines in ~/.xsession that say:
  940.  
  941.    if [ -r $xsession -a "$0" != $xsession ]; then
  942.     if [ -x $xsession ]; then
  943.         exec $xsession
  944.     else
  945.         exec /bin/sh $xsession
  946.     fi
  947.    fi
  948.  
  949. 3. Change the line that says
  950.  
  951.    /usr/bin/X11/4Dwm >/dev/console 2>&1 &
  952.  
  953.    to
  954.  
  955.    /usr/bin/X11/mwm > /dev/console 2>&1 &
  956.  
  957. ------------------------------
  958.  
  959. Subject:   -36- Where can I learn more about the Window Manager
  960.                 behavior?
  961. Date: 07 May 93 00:00:01 EST
  962.  
  963. The man pages for 4Dwm and mwm contain a wealth of information on the
  964. window manager. There are also online files. You may want to read
  965. /usr/tutor/Customize/example.4Dwmrc as well as
  966. /usr/people/4Dgifts/.4Dwmrc (if you have the IDO option).  The
  967. OSF/Motif manuals listed in the bibliography are also good places to
  968. find information. (4Dwm is based on mwm).
  969.  
  970. ------------------------------
  971.  
  972. Subject:   -37- How do I recover from a failed window manager
  973.                 customization attempt?
  974. Date: 07 May 93 00:00:01 EST
  975.  
  976. If your attempt at customization leaves you in a state where buttons
  977. and menus are no longer recognized, you can recover by pressing the
  978. <Alt><CTRL><Shift><!>keys simultaneously. A menu appears that will let
  979. you choose Motif, Iris, or user defaults. Choose either Motif or Iris
  980. defaults and then push OK. This restarts the window manager to a usable
  981. state.
  982.  
  983. ------------------------------
  984.  
  985. Subject:   -38- What is the difference between .xsession and
  986.                 .sgisession?
  987. Date: 07 May 93 00:00:01 EST
  988.  
  989. The system Xsession file (/usr/lib/X11/xdm/Xsession or Xsession-remote)
  990. starts up a number of important things when you log in, eg. 4Dwm,
  991. toolchest, loads resources, sets your XUSERFILESEARCHPATH, sets your
  992. root background, etc.
  993.  
  994. One of the last things it does is look in your home directory for a
  995. .sgisession file.  This allows you to start additional programs at
  996. login time. This is the file that you would use to start a mailbox,
  997. additional window, a calendar, etc.
  998.  
  999. ADVANTAGES OF $HOME/.sgisession :
  1000.  
  1001.     1) You don't need to read through yet another system file to see
  1002.        what you need or don't need.
  1003.  
  1004.     2) You can override some of the defaults the system default has
  1005.        given you.
  1006.  
  1007. DISADVANTAGES OF $HOME/.sgisession :
  1008.  
  1009.     1) You cannot override ALL of the defaults set for you.
  1010.     
  1011.     2) Some things you can't change from a .sgisession file :
  1012.  
  1013.        A) You can't start a different window manager.
  1014.        B) You can't change the way the console starts.
  1015.        C) You can't change toolchest output redirection to
  1016.       the console.
  1017.  
  1018.     3) Users of other vendors' equipment are used to seeing a .xsession
  1019.        file.
  1020.  
  1021. After checking for a "failsafe" (ie. no graphics) login, one of the
  1022. first things that /usr/lib/X11/xdm/Xsession does is check for
  1023. $HOME/.xsession.  If it exists, Xsession will exec your .xsession
  1024. file.  This means that if you are REALLY sure you know what you are
  1025. doing, you can login with a different window manager, xterm as a
  1026. console, or xwsh not already iconified, etc.  You can also turn off the
  1027. toolchest output redirection, and start anything else you might have
  1028. done in $HOME/.sgisession. There is a discussion on xsession files in
  1029. volume 3 of the O'Reilly series.
  1030.  
  1031. This next part might be redundant
  1032.  
  1033. From the login event sequence mentioned earlier, you will note that
  1034. /usr/lib/X11/xdm/Xsession tries to exec $HOME/.xsession if it exists.
  1035. This is how you would go about changing programs started by default. An
  1036. example is the start of the window manager. There is a discussion on
  1037. xsession files in volume 3 of the O'Reilly series. For examples of
  1038. alternate xsession files look at /usr/people/4Dgifts/.xsession or
  1039. /usr/demos/.xsession.
  1040.  
  1041. If you don't have a $HOME/.xsession file, /usr/lib/X11/xdm/Xsession
  1042. starts things for you and eventually looks for $HOME/.sgisession.  This
  1043. is a good way to start additional programs without changing what is
  1044. started by default.
  1045.  
  1046. ------------------------------
  1047.  
  1048. Subject:   -39- After copying /usr/lib/X11/xdm/Xsession to .xsession, I
  1049.                 can't log in.
  1050. Date: 07 May 93 00:00:01 EST
  1051.  
  1052. After copying this file to your home directory, you need to remove all
  1053. references to "xsession". References to xsession cause the system to
  1054. try to execute $HOME/.xsession, which will create an infinite loop.
  1055.  
  1056. Remove the lines in ~/.xsession that say:
  1057.  
  1058. if [ -r $xsession -a "$0" != $xsession ]; then
  1059.        if [ -x $xsession ]; then
  1060.            exec $xsession
  1061.        else
  1062.            exec /bin/sh $xsession
  1063.        fi
  1064. fi
  1065.  
  1066. ------------------------------
  1067.  
  1068. Subject:   -40- What are the important login and resource files for IRIX
  1069.                 4D1-4.0?
  1070. Date: 07 May 93 00:00:01 EST
  1071.  
  1072. The following three file groupings indicate where files that affect
  1073. your login session reside.
  1074.  
  1075. 1) /usr/lib/X11/* - This is THE starting place. Here you find the
  1076. system default bindings for Motif, 4Dwm, and the Toolchest. The xdm
  1077. directory lives here as well as the app-defaults directory. xdm
  1078. controls the session management.Many application defaults are set in
  1079. the app-defaults directory.
  1080.  
  1081. 2) $HOME/[.Xdefaults, .4Dwmrc, .chestrc, .xsession, .sgisession] Here
  1082. you find the files that control your system set-up.  You create these
  1083. files; they don't exist when you first log in.
  1084.  
  1085. 3) /usr/bin/X11 - This is where the binaries live. It makes life nice
  1086. to include this directory in your path.
  1087.  
  1088. ------------------------------
  1089.  
  1090. Subject:   -41- What is the sequence of events that occur at login time?
  1091. Date: 10 Dec 93 00:00:01 EST
  1092.  
  1093. This is a bare bones synopsis of the events that occur when
  1094. you log in to the console via xdm (xdm is the default method
  1095. of logging in).
  1096.  
  1097.  1) Provide a "failsafe" (nographics) login if required/requested.
  1098.  2) Exec $HOME/.xsession if it exists. If it exists, the remaining
  1099.     steps should normally be included in the users .xsession file as
  1100.     well.
  1101.  3) Load $HOME/.Xresources if it exists.
  1102.  4) Set XUSERFILESEARCHPATH.
  1103.  5) Incorporate a "shell" environment
  1104.     into the "session". (man userenv)
  1105.  6) Set the root background and cursor.
  1106.  7) Disable display access control (xhost +).  (man xhost)
  1107.  8) Start 4Dwm.
  1108.  9) Wait for 4Dwm to come up.
  1109. 10) Start the console.
  1110. 11) Execute $HOME/.sgisession if it exists.
  1111. 12) Start WorkSpace if the user wants it.
  1112. 13) Put a Toolchest on each screen.
  1113. 14) Exec the "reaper". (man reaper / endsession)
  1114.  
  1115. ------------------------------
  1116.  
  1117. Subject:   -42- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
  1118.                 environment variable I set in my shell's startup files?
  1119. Date: 30 Apr 94 00:00:01 EST
  1120.  
  1121. The script /usr/lib/X11/xdm/Xsession (or, if you have one, your own
  1122. ~/.xsession) runs when you log in and starts your window manager
  1123. (4Dwm), Workspace, etc. To give these programs a copy of the
  1124. environment you define in your shell's startup files, Xsession first
  1125. runs 'userenv', which runs your shell just to see what environment
  1126. variables your shell's startup files set and puts them into Xsession's
  1127. environment.  Later on Xsession runs 4Dwm, Workspace, etc. and they
  1128. inherit Xsession's environment including the environment variables
  1129. which 'userenv' got from your shell's startup files.
  1130.  
  1131. However, 'userenv' objects to 1) errors in your shell startup files, 2)
  1132. commands which print output to the terminal and 3) commands like 'stty'
  1133. and 'tset', which expect to be connected to a terminal.  Any of these
  1134. may cause 'userenv' to give up completely, so that Xsession, 4Dwm,
  1135. Workspace, etc. do not get any of your shell's enviroment.
  1136.  
  1137. To get 'userenv' to work, you must 1) make sure that your shell startup
  1138. files are error-free and 2) protect 'userenv' from commands which print
  1139. output or expect to be connected to a terminal by testing for the
  1140. ENVONLY environment variable before running them. (See the userenv(1)
  1141. manpage.) You might try disabling your shell startup files (or parts
  1142. thereof) one by one to narrow down which is causing the problem.  Be
  1143. sure to check both personal and system-wide shell startup files! See
  1144. your shell's manpage for a complete list.
  1145.  
  1146. Note that each terminal window (aka 'winterm', 'xwsh' or 'xterm') runs
  1147. a fresh copy of your shell, so it has a second chance to set your
  1148. environment variables. Your shell is now connected to a terminal and
  1149. 'userenv' isn't involved, so none of the above problems apply. The
  1150. environment in a terminal window will appear correct, and programs
  1151. started from a window (e.g. by typing 'workspace' to start Workspace)
  1152. will inherit the environment properly.  Furthermore, 'userenv' often
  1153. appears to work when run inside a terminal window, even when it does
  1154. not work when run from Xsession.  This is all fine, but it doesn't help
  1155. when you log in. One right way to see if 'userenv' is working when it
  1156. should is to add the line 'env > $HOME/test-userenv' to Xsession after
  1157. the line that runs 'userenv', log in and examine the file it creates.
  1158.  
  1159. 'bash' users take note: 'bash' has particular problems with 'userenv',
  1160. and there is a special version of 'userenv' which works with 'bash' at
  1161. viz.tamu.edu:/pub/sgi/software/userenv/userenv.tar.gz.
  1162.  
  1163. ------------------------------
  1164.  
  1165. Subject:   -43- Why doesn't the window manager's "Log Out" routine work?
  1166. Date: 09 Jan 94 00:00:01 CST
  1167.  
  1168. "Log Out" runs 'endsession', which under some versions of IRIX 4.0.5
  1169. does not work if your hostname contains a number. Fortunately, 'endsession'
  1170. is a script, and you can fix it by changing the line
  1171.  
  1172.     PROP_DISPLAY=`expr $DISPLAY : '\(.*\).[1-9]' \| $DISPLAY`
  1173.  
  1174. to
  1175.  
  1176.     PROP_DISPLAY=`expr $DISPLAY : '\(.*\)\.[1-9]' \| $DISPLAY`
  1177.  
  1178. i.e. just add a backslash before the second period.
  1179.  
  1180. ------------------------------
  1181.  
  1182. Subject:   -44- Where is the default value of PATH set?
  1183. Date: 10 Dec 93 00:00:01 EST
  1184.  
  1185. Every program which allows a user to log in (telnet, rlogin, pandora,
  1186. etc.) can specify PATH. Shells may as well if it isn't already set.
  1187. There are many slightly different default values, and relying on them
  1188. is a good way to get confused. The only reliable method is to set PATH
  1189. in your shell's startup files. These are different for each shell, and
  1190. are described in each shell's manpage. Beware of 'ksh', which has an
  1191. internal, invisible default path ('/bin:/usr/bin') which it uses when
  1192. PATH is not set.
  1193.  
  1194. ------------------------------
  1195.  
  1196. Subject:   -45- How can I convert images to & from other formats?
  1197. Date: 13 Apr 94 00:00:01 EST
  1198.  
  1199. IRIX comes with several tools which convert images to or from SGI's RGB
  1200. format.  The executables are part of the eoe2.sw.imagetools subsystem,
  1201. and include:
  1202.  
  1203. fromalias - convert an Alias image to an IRIS image
  1204. frombin - create an RGB IRIS image file from a binary dump of image data
  1205. fromcmap - convert a color map into an image with one scanline
  1206. fromcube - convert a Cubicomp/Vertigo image file to IRIS format
  1207. fromdi - convert an old .di dithered image into an IRIS image
  1208. fromface - convert a UNIX faceserver image into an IRIS image
  1209. fromgif - convert a GIF image into an IRIS image
  1210. frommac - convert a MacPaint image into an IRIS image
  1211. frompic - convert a MOVIE BYU .PIC image to an IRIS image
  1212. fromppm - convert an image in Jef Poskanzer's format into an IRIS image
  1213. fromrla - convert a Wavefront image to an IRIS image
  1214. fromsun - convert a sun image into an IRIS image
  1215. fromtarga - convert a targa image into an IRIS image
  1216. fromxbm - convert an X Bitmap image into an IRIS image
  1217. fromxud - convert an xwd file into an IRIS image
  1218. fromxwd - convert an xwd file into an IRIS image
  1219. fromyuv - convert an Abekas yuv image into an IRIS image
  1220. toalias - convert an IRIS image to an Alias image
  1221. toascii - convert an IRIS image to text characters
  1222. tobin - convert an IRIS image to binary dump of pixel data
  1223. tobw - convert an IRIS image to black and white
  1224. togif - convert an IRIS image to a Compuserve GIF image
  1225. tomac - convert an IRIS image to MacPaint format
  1226. tonews - convert an IRIS image into NeWS format
  1227. topict - convert an IRIS image to Macintosh PICT format
  1228. toppm - convert an IRIS image file into Jef Poskanzer's ppm image format
  1229. tops - convert an IRIS image to PostScript
  1230. toscitex - Convert IRIS images into Scitex CT2T images
  1231. tosun - convert an IRIS image to a sun raster file
  1232. totarga - convert an IRIS image to a type 2 targa image
  1233. toyuv - convert an IRIS image to yuv format
  1234.  
  1235. The source for each of these tools is in the 4Dgifts
  1236. dev.dev_sw.giftsfull subsystem and placed in the directory
  1237. /usr/people/4Dgifts/iristools/imgtools.  Each also has a manpage.
  1238.  
  1239. Similar tools for more formats ('frompict', 'frompixar', 'fromtiff',
  1240. 'fromutah', 'totiff', 'toutah' and 'toxbm' at last count), as well as
  1241. some which come with IRIX and a few miscellaneous cool image editing
  1242. tools, are in ftp.sgi.com:/graphics/bin/. 'fromjpeg' and 'tojpeg' can
  1243. be found in explorer.dgp.toronto.edu:/pub/sgi/sgijpeg/.
  1244. swedishchef.lerc.nasa.gov:/ has 'fromvicar' in /image/conversion/from/,
  1245. 'tocolps' and 'topcl' in /image/conversion/to/ and many other image-
  1246. related tools in nearby directories.
  1247.  
  1248. Finally, 'imgworks' (in the imgtools.sw.tools subsystem) understands
  1249. RGB, TIFF and FIT formats, and several freeware programs including
  1250. SDSC's 'imtools' (in ftp.sdsc.edu:/pub/sdsc/graphics/imtools/sgi_4d/),
  1251. 'xv' (in ftp.cis.upenn.edu:/pub/xv/) and ImageMagick (in
  1252. ftp.x.org:/contrib/) work on SGIs and understand SGI's RGB format as
  1253. well as many other formats.
  1254.  
  1255. ------------------------------
  1256.  
  1257. Subject: + -46- What is the format of SGI's RGB files?
  1258. Date: 30 Apr 94 00:00:01 EST
  1259.  
  1260. Read ftp.sgi.com:/graphics/SGIIMAGESPEC.
  1261.  
  1262. ------------------------------
  1263.  
  1264. Subject:   -47- Can I compress RGB bitmaps?
  1265. Date: 07 May 93 00:00:01 EST
  1266.  
  1267. Yes.  Use /usr/sbin/rle, which is part of eoe2.sw.imagetools.
  1268.  
  1269. ------------------------------
  1270.  
  1271. Subject:   -48- How do I make a screen dump?
  1272. Date: 27 Jan 94 00:00:01 EST
  1273.  
  1274. Use the utilities 'snapshot', 'scrsave' or 'imgsnap'. All have
  1275. manpages.  'snapshot' and 'scrsave' are in the eoe2.sw.gltools
  1276. subsystem, 'imgsnap' is in the imgtools.sw.tools subsystem and their
  1277. manpages are in the respective *.man.* subsystems.
  1278.  
  1279. From within a GL program, you should call readdisplay().  For an
  1280. example look at ~4Dgifts/iristools/imgtools/scrsave.c.
  1281.  
  1282. ------------------------------
  1283.  
  1284. Subject:   -49- Can I use 4Dgifts code in my application?
  1285. Date: 07 May 93 00:00:01 EST
  1286.  
  1287. Yes.  The 4Dgifts are a "gift" and developers are welcome to use the
  1288. code.  However, SGI does not support the code in 4Dgifts.  Note that
  1289. certain restrictions apply.  Please read the copyright statement in
  1290. ~4Dgifts/README.Copyright.
  1291.  
  1292. ------------------------------
  1293.  
  1294. Subject:   -50- What does ERR_WMANIPC mean?
  1295. Date: 07 May 93 00:00:01 EST
  1296.  
  1297. The "WMAN" in that message means "window manager."  However, this 
  1298. no longer means "window manager" such as 4Dwm, but rather the entire 
  1299. X Window system.  The error means that the GL program triggered a
  1300. fatal X error.
  1301.  
  1302. A GL program can get an X error, because all GL programs are actually X
  1303. clients.  When a GL program does a winopen(), libgl actually calls
  1304. XCreateWindow, etc.)
  1305.  
  1306. When a GL program gets an X error, libgl prints out these X errors
  1307. using this error message:
  1308.  
  1309.     GL: X request = maj.min,  error code = ercode
  1310.  
  1311. where
  1312.  
  1313.     maj = major request code that caused the error
  1314.     min = minor request code
  1315.     ercode = X error code
  1316.  
  1317. This turns out to be easy to interpret, so long as the request was a
  1318. core X protocol request (e.g., a CreateWindow request).  In that case:
  1319.  
  1320.     1. You can look up the major code in /usr/include/X11/Xproto.h.
  1321.     2. The minor code is not used.
  1322.     3. The X error code can be found in /usr/include/X11/X.h.
  1323.  
  1324. As you can see in Xproto.h, the core X protocol requests have request
  1325. codes <= 127.
  1326.  
  1327. However, if maj > 127, then the request is an X extension request.
  1328. Unfortunately, it can be difficult to interpret this unless you built
  1329. your program with a debugging libgl.a (compiled with -g).  The reason
  1330. is that for an X extension, the major request code and the starting
  1331. error code are copied from the X server during client startup, and
  1332. these codes are saved in variables inside libgl.  With a debugging
  1333. libgl, these variables can be printed out from within a debugger, such
  1334. as dbx.
  1335.  
  1336. If the major code indicates an X Input extension request, then the
  1337. minor numbers then tell the X input request type, and these are found
  1338. in /usr/include/X11/extensions/XIproto.h.
  1339.  
  1340. Finally, the X Input Extension uses 132 as its "starting error code."
  1341. The possible errors are found in /usr/include/X11/extensions/XI.h,
  1342. where they're defined like this:
  1343.  
  1344.     #define XI_BadDevice   0
  1345.     #define XI_BadEvent    1
  1346.     #define XI_BadMode     2
  1347.     #define XI_DeviceBusy  3
  1348.     #define XI_BadClass    4
  1349.  
  1350. If you add 132 to these numbers, you get the error that's reported by
  1351. the libgl error message.
  1352.  
  1353. ------------------------------
  1354.  
  1355. Subject:   -51- How can I translate screen (x,y) coords into world
  1356.                 (x,y,z) coords?
  1357. Date: 07 May 93 00:00:01 EST
  1358.  
  1359. Check the manual page for mapw(3G) or mapw2(3G).  mapw() returns a line
  1360. into (x,y,z) space.
  1361.  
  1362. ------------------------------
  1363.  
  1364. Subject:   -52- How can I translate world (x,y,z) coords into screen
  1365.                 (x,y) coords?
  1366. Date: 07 May 93 00:00:01 EST
  1367.  
  1368. There are two methods.  The first method is detailed in
  1369. ~4Dgifts/examples/grafix/world2scrn.c, which is part of the
  1370. dev.dev_sw.giftsfull package.  It multiplies the (x,y,z) vector into
  1371. the current modeling and projection matrixes, and uses the result to
  1372. interpolate based on the window size and position.
  1373.  
  1374. The second method uses the current cursor position as a trick and is
  1375. much simpler.  Use cmov() to set the cursor position to the point of
  1376. interest in world space, then call getcpos() to return the cursor
  1377. position in screen coordinates.  Note that if your entire viewport is
  1378. off-screen, the results are undefined and you'll have to use the first
  1379. method.
  1380.  
  1381.     float x,y,z;
  1382.     short x1, y1;
  1383.     
  1384.     cmov (x,y,z);
  1385.     getcpos (&x1, &y1);
  1386.  
  1387. ------------------------------
  1388.  
  1389. Subject:   -53- I call mapcolor(index, R, G, B) but nothing happens.
  1390.                 Why?
  1391. Date: 07 May 93 00:00:01 EST
  1392.  
  1393. You either need to call glcompat(GLC_SLOWMAPCOLORS, TRUE) at the
  1394. beginning of your program, or call gflush() after calling mapcolor.
  1395.  
  1396. See the NOTES section in "man mapcolors" and also "man glcompat" for
  1397. further info. (This may also be in the GL release notes)
  1398.  
  1399. ------------------------------
  1400.  
  1401. Subject:   -54- What's wrong with blink()?
  1402. Date: 10 Jun 93 00:00:01 EST
  1403.  
  1404. - blink() is broken all the way up through 4.0.5F, where blink() only
  1405.   blinks to black.
  1406.  
  1407. - you can work-around this blink() problem by doing the following:
  1408.  
  1409.     blink(rate, index, red<<8, green<<8, blue<<8)
  1410.  
  1411. - ~4Dgifts/examples/glpg/ch04/blinker.c has three main problems:
  1412.  
  1413.     - it doesn't do the above work-around.
  1414.     - it doesn't do a gflush after mapping colors.
  1415.     - it doesn't turn blinking off initially.
  1416.  
  1417. - what happens is that if a program starts anything blinking and exits
  1418.   without ever turning blinking off with blink(-1, 0, 0, 0, 0) then the
  1419.   next program to attempt blinking will not be able to blink.  this
  1420.   happens if for instance you close the blinker window before its 10
  1421.   second sleep() has completed.
  1422.  
  1423. - a simple idea for a work-around for this problem: programs which do
  1424.   blinking should turn their blinking on when they have focus; they
  1425.   should turn all blinking off when they lose focus.  This is not
  1426.   perfect but is a plausible attempt at sharing the 20 blinking
  1427.   system-wide colormap entries.
  1428.  
  1429. Here is a copy of ~4Dgifts/examples/glpg/ch04/blinker.c that contains
  1430. the above workarounds, except for input-focus:
  1431.  
  1432. #include <gl/gl.h>
  1433.  
  1434. #define MAXBLINKS       20    /* maximum number of blinking entries */
  1435. #define FIRSTBLINKCI    64    /* avoid the first 64 colors */
  1436.  
  1437. main()
  1438. {
  1439.     int i;
  1440.  
  1441.     prefsize(400, 400);
  1442.     winopen("blinker");
  1443.     ortho2(-0.5, 20.0*MAXBLINKS + 9.5, -0.5, 500.5);
  1444.     color(BLACK);
  1445.     clear();
  1446.  
  1447.     /* always turn blinking off before calling 'blink' */
  1448.     blink (-1, 0, 0, 0, 0);
  1449.  
  1450.     for (i = MAXBLINKS - 1; i >= 0 ; i--) {
  1451.     mapcolor(i + FIRSTBLINKCI, 255, 255, 255);
  1452.     /* always call gflush() after mapcolors() */
  1453.     gflush();
  1454.     color(i + FIRSTBLINKCI);
  1455.     sboxfi(i*20 + 10, 10, i*20 + 20, 490);
  1456.     /* GL bug in blink -- must left-shift r,g,b values */
  1457.     blink(i + 1, i + FIRSTBLINKCI, 255 << 8, 0 << 8, 0 << 8);
  1458.     }
  1459.     sleep(10);
  1460.     blink(-1, 0, 0, 0, 0);      /* stop all blinking */
  1461.     gexit();
  1462.     return 0;
  1463. }
  1464.  
  1465. ------------------------------
  1466.  
  1467. Subject:   -55- When I try to run UIM/X uxserverd, I get an error
  1468.                 message saying, "license file has been modified, cannot
  1469.                 start the UIM/X license server".
  1470. Date: 07 May 93 00:00:01 EST
  1471.  
  1472. You probably have been given a bad key.  The most frequent causes of
  1473. incorrect keys have been incorrect capitalization and incorrect IP
  1474. addresses.
  1475.  
  1476. The program that generates the UIM/X key requires that the "host ID"
  1477. (or IP address) be in hexadecimal format.  If you feed it the standard
  1478. form of IP address (i.e., 123.45.678.90) it will generate the wrong key
  1479. and will not complain.
  1480.  
  1481. To ensure that you are is giving the correct information when
  1482. requesting a UIM/X key, please do the following:
  1483.  
  1484. Hostname:  Type in 'hostname' at the prompt, and be sure to say exactly
  1485. what it says (including capitalization, if any).
  1486.  
  1487. Host ID:  Type in 'hostid' at the prompt, and be sure to say exactly
  1488. what it says.  You will be reading back a series of numbers of the form
  1489. 0xc030c844.  The leading 0x indicates that the following number is
  1490. hexadecimal.
  1491.  
  1492. The key generating script is highly sensitive to capital letters.  Make
  1493. sure you confirm the case of the letters, both when getting the
  1494. hostname/hostid and when having your key read back to you.
  1495.  
  1496. If this still doesn't fix the problem, you may have mixed files between
  1497. UIM/X 1.0 and 2.0.  Completely remove UIM/X, re-install it, and
  1498. reproduce a Uimx2_0.license file with the correct information.
  1499.  
  1500. ------------------------------
  1501.  
  1502. Subject:   -56- What is a GL widget?
  1503. Date: 10 Jun 93 00:00:01 EST
  1504.  
  1505. GL widget refers to the GlxDraw (generic) and GlxMDraw (Motif) widgets
  1506. that allow you to embed GL windows in Xt-based programs.  To embed a GL
  1507. windows in X-based programs is frequently called "Mixed-model" or "GLX"
  1508. programming.
  1509.  
  1510. There are several examples of mixed-model programming in the directory
  1511. /usr/people/4Dgifts/examples/GLX.
  1512.  
  1513. ------------------------------
  1514.  
  1515. Subject:   -57- I'm using the GlxMDraw widget and it doesn't seem that
  1516.                 colors are being installed correctly.  Overlays in the
  1517.                 GlxMDraw widget are displayed in red and gray instead of
  1518.                 the colors I specify.  What is the problem?
  1519. Date: 10 Jun 93 00:00:01 EST
  1520.  
  1521. The window manager must be directed to install all appropriate
  1522. colormaps.  Use the XSetWMColormapWindows() call to do this -- list one
  1523. window for each colormap to be installed plus the top level window.  If
  1524. using overlays, include the overlay window as well as the normal GL
  1525. window.
  1526.  
  1527. If your window is TrueColor, you should still install the appropriate
  1528. colormap, as Indigo TrueColor is simulated using a colormap.
  1529.  
  1530. ------------------------------
  1531.  
  1532. Subject:   -58- I get a "Broken Pipe" error when I close the window of
  1533.                 an X client, such as xman or xterm.  What does this
  1534.                 error mean?  Is there something wrong with my system?
  1535. Date: 10 Jun 93 00:00:01 EST
  1536.  
  1537. Typically the error message resembles the following:
  1538.  
  1539. XIO: fatal IO error 32 (Broken pipe) on X server ":0.0" after 214
  1540. requests (214 known processed) with 0 events remaining.  The connection
  1541. was probably broken by a server shutdown or KillClient.
  1542.  
  1543. The Window Manager is reporting that the pipe for your X client has
  1544. been broken.  This is normal when an X client exits.  There is nothing
  1545. wrong with your system. This message will also occur when the system is
  1546. shut down.  This is not an error condition and no core files are
  1547. produced.
  1548.  
  1549. ------------------------------
  1550.  
  1551. Subject:   -59- Is there a way to switch on the fly between single and
  1552.                 double buffering within a GL widget?
  1553. Date: 10 Jun 93 00:00:01 EST
  1554.  
  1555. There is no way to switch between single and double buffered mode
  1556. within the same window. (In X, this would mean changing the depth,
  1557. which is not allowed.)
  1558.  
  1559. To simulate this, you can create two GL widgets: a double buffered GL
  1560. widget and a single buffered GL widget.  When it is time to change the
  1561. buffering mode, restack the windows so that the appropriate one is on
  1562. top. If the two windows are created with a common parent, they move
  1563. together when the parent is moved.
  1564.  
  1565. For non-mixed mode applications, the GL performs this switching when
  1566. you call gconfig().
  1567.  
  1568. ------------------------------
  1569.  
  1570. Subject:   -60- Why doesn't SGI's xlock lock my screen?
  1571. Date: 10 Jun 93 00:00:01 EST
  1572.  
  1573. If you or the super-user do not have a password, xlock will not lock.
  1574. Also, in IRIX 4.x, xlock is set up by default to act as if invoked with
  1575. the "-nolock" option, which tells it not to lock the screen.  If you
  1576. want force xlock to lock, do either of the following:
  1577.  
  1578. a) Use the "+nolock" option when invoking xlock.  This means
  1579.    "not nolock" (the opposite of "-nolock").  For example:
  1580.  
  1581.    % xlock +nolock
  1582.  
  1583. b) Add the following line to your ~/.Xdefaults file:
  1584.  
  1585.    XLock.nolock:    False
  1586.  
  1587. In IRIX 5.x, the default behavior of xlock has been reversed, so xlock
  1588. does indeed lock by default.  If you wish to keep the IRIX 4.x
  1589. behavior, invoke xlock with the -nolock option.
  1590.  
  1591. ------------------------------
  1592.  
  1593. Subject:   -61- Why does the X server sometimes abort when I log out in
  1594.                 IRIX 5.0.1 and IRIX 5.1?
  1595. Date: 01 Oct 93 00:00:01 EST
  1596.  
  1597. BACKGROUND:  Both problems are related to resetting of the X server.
  1598. Normally the X server process is spawned by xdm (the X Display
  1599. Manger).  The X server process continues to run after every login and
  1600. logout of the graphics head; the server simply resets to its initial
  1601. state every time someone logs out.  In X server terminology, the X
  1602. server goes through multiple generations.
  1603.  
  1604. PROBLEM 1:  The dynamically loadable Display PostScript extension has a
  1605. bug where it does not properly reset the X server state on server reset
  1606. (ie, generations other than the first).
  1607.  
  1608. The problem only occurs if you have dps_eoe.sw.xserver_ext (which
  1609. contains /usr/lib/X11/dyDDX/xdps.so which is the dynamically loadable
  1610. Display PostScript extension).  dps_eoe is installed by default.
  1611.  
  1612. This problem affects all CPUs and graphics hardware.
  1613.  
  1614. PROBLEM 2:  If the user logs out while any GL-based application (such
  1615. as buttonfly, WorkSpace, jot, etc) is running, the server will not
  1616. reset.
  1617.  
  1618. Typically you will find errors in /usr/adm/SYSLOG similar to the
  1619. following:
  1620.  
  1621.     date host xdm[pid]: IO Error in XOpenDisplay
  1622.     date host xdm[pid]: Display :0 cannot be opened
  1623.     date host xdm[pid]: Display :0 is being disabled
  1624.     date host xdm[pid]: Rescanning both config and servers files
  1625.  
  1626. WORKAROUND:  As root, edit /usr/lib/X11/xdm/xdm-config and change the
  1627. line
  1628.  
  1629.     DisplayManager._0.terminateServer:      False
  1630.  
  1631. to
  1632.  
  1633.     DisplayManager._0.terminateServer:      True
  1634.  
  1635. (Please note that the contents of xdm-config are case-sensitive.)
  1636. Then restart the window system (/usr/gfx/stopgfx; /usr/gfx/startgfx)
  1637.  
  1638. If the above workaround doesn't work, try setting
  1639.  
  1640.     DisplayManager._0.startAttempts:        1
  1641.  
  1642. to
  1643.  
  1644.     DisplayManager._0.startAttempts:        4
  1645.  
  1646. This change forces xdm to try to start the X server up to four times,
  1647. if the first three fail.
  1648.  
  1649. ------------------------------
  1650.  
  1651. Subject: + -62- How can I get X authorization to work?
  1652. Date: 27 Apr 94 00:00:01 EST
  1653.  
  1654. Under IRIX 5.1.x or earlier, don't try. The MIT-MAGIC-COOKIE-1 protocol
  1655. did not work, and DGL programs did not understand X authority.
  1656.  
  1657. Under IRIX 5.2 or later, heed the wise words of Mark Kilgard of SGI's
  1658. X Window Systems group <mjk@hoot.asd.sgi.com>:
  1659.  
  1660. The basic mechanism for the MIT-MAGIC-COOKIE-1 authorization protocol
  1661. is implemented by the X server, Xlib, and xdm, and does work in IRIX
  1662. 5.x.  MIT-MAGIC-COOKIE-1 is the only supported protocol.
  1663.  
  1664. Two caveats before I describe how to enable X authorization:
  1665.  
  1666. 1) Old remote IRIS GL programs probably will not be able to connect to
  1667.    the X server when X authority is enabled. (More on this below.)
  1668.  
  1669. 2) Due to a problem with how the local hostname is handled, to use X
  1670.    authority in the IRIX 5.x releases, you will need to make sure your
  1671.    /etc/sys_id file has a simple hostname, ie. hoot instead of a fully
  1672.    resolved hostname like hoot.asd.sgi.com  This problem has already
  1673.    been fixed for the next general release of IRIX.
  1674.  
  1675. TO ENABLE X AUTHORIZATION, do the following to your IRIX 5.2 system:
  1676.  
  1677.     1)  Edit /var/X11/xdm/xdm-config as root and change the line saying
  1678.  
  1679. DisplayManager*authorize:               off
  1680.  
  1681.       to say
  1682.  
  1683. DisplayManager*authorize:               on
  1684.  
  1685.     2) Edit /var/X11/xdm/Xsession, /var/X11/xdm/Xsession-remote, and
  1686.        /var/X11/xdm/Xsession.dt as root and change the line saying
  1687.  
  1688. /usr/bin/X11/xhost +
  1689.  
  1690.        to say
  1691.  
  1692. #/usr/bin/X11/xhost +
  1693.  
  1694.        This disables the "xhost +" by commenting out the command.
  1695.  
  1696.     3) Make sure your /etc/sys_id file has no periods in it.  For
  1697.        example, change as root:
  1698.  
  1699. hoot.asd.sgi.com
  1700.  
  1701.        to say
  1702.  
  1703. hoot
  1704.  
  1705.     4) Reboot the machine OR restart a new xdm and X server.  This can
  1706.        be done as root with the following command:
  1707.  
  1708. ( /usr/gfx/stopgfx ; killall xdm ; /usr/gfx/startgfx ) &
  1709.  
  1710.     5) Log in.  X authorization should be enabled.
  1711.  
  1712. If you want to disable X authorization and return to the default system
  1713. state where X clients can connect to the X server from any machine,
  1714. reverse the changes in steps 1 and 2 and repeat step 4.
  1715.  
  1716. If you want more information on X authorization, see the manpages for
  1717. xdm(1), Xserver(1), Xsgi(1), Xsecurity(1), xauth(1) and xhost(1)
  1718.  
  1719. X AUTHORITY AND REMOTE IRIS GL PROGRAMS: One of the major reaons for
  1720. Silicon Graphics shipping its window system so that an X client from
  1721. any machine could connect to the X server was because IRIS GL programs
  1722. running remote using the DGL (distributed GL) protocol didn't
  1723. interoperate with the X authorization mechanism; the dgld daemon that
  1724. would run on the machine with graphics hardware had no way to get the
  1725. correct X authority information to connect to the X server.
  1726.  
  1727. This has been fixed for IRIX 5.2, but the fix only applies to IRIX 5
  1728. binaries running remotely on an IRIX 5.2 system connecting to an IRIX
  1729. 5.2 X server.  In particular, remotely run IRIX 4 IRIS GL binaries will
  1730. continue to not interoperate with an IRIX 5.2 X server (or a pre-IRIX
  1731. 5.2 X server).  If you recompile your old IRIS GL binaries on IRIX 5.2,
  1732. they then will work remotely connecting to IRIX 5.2 X servers running X
  1733. authority.
  1734.  
  1735. The bottom line is if you want an IRIS GL program to run remotely on an
  1736. X server using X authorization, you need to make sure the program is an
  1737. IRIX 5 binary running on an IRIX 5.2 machine and the machine with the X
  1738. server is also an IRIX 5.2 machine.
  1739.  
  1740. To avoid a possible misconception: IRIS GL programs RUNNING LOCALLY
  1741. (ie, not using DGL) WILL WORK FINE on an IRIX 5.2 system no matter if
  1742. they are IRIX 4 or IRIX 5 binaries.  The problem with X authority is
  1743. only for REMOTE IRIS GL programs.
  1744.  
  1745. Also note that for X authorization to work for remote hosts, the remote
  1746. program must have access to the correct X authorization magic cookie
  1747. (normally read from ~/.Xauthority).  If you don't have a shared NFS
  1748. mounted home directory, you'll probably need to use the xauth command
  1749. to transfer the X authorization magic cookie to the remote
  1750. ~/.Xauthority file.
  1751.  
  1752. THE FUTURE:  Hopefully in the next general release of IRIX, a mechanism
  1753. to enable and disable X authorization using a chkconfig option will be
  1754. supported.  The problem with /etc/sys_id not having periods will
  1755. definitely be fixed in the next general release of IRIX.  The problem
  1756. with pre-IRIX 5.2 X servers and binaries not interoperating with X
  1757. authorization will likely not be fixed. Fixing the problem required a
  1758. DGL protocol extension which both the IRIS GL program and dgld must
  1759. know about; this can't be fixed in already shipped software.
  1760.  
  1761. ------------------------------
  1762.  
  1763. Subject: + -63- Why do long resources cause X to crash mysteriously in
  1764.                 IRIX 5.2?
  1765. Date: 30 Apr 94 00:00:01 EST
  1766.  
  1767. Mark Kilgard <mjk@hoot.asd.sgi.com> explains:
  1768. There is a bug in an SGI-specific optimization of Xlib's resource
  1769. database loading code. The bug is exposed by long resource strings.
  1770. It looks like extremely long X resource strings should be avoided in
  1771. IRIX 5.2.  I've already fixed the bug; it is fixed for IRIX 5.3.
  1772.  
  1773. ------------------------------
  1774.  
  1775. Subject: + -64- How can I turn off the IRIX 5.2 Magic user environment?
  1776. Date: 04 May 94 00:00:01 EST
  1777.  
  1778. Mark Andrews <mark@alias.com> says:
  1779. You can disable the Indigo Magic environment in two ways:
  1780.  
  1781. 1) If you wish to disable it for all users on the machine:
  1782.  
  1783.        chkconfig desktop off
  1784.  
  1785. 2) If you wish to disable it for a specific user, do
  1786.  
  1787.        touch ~<username>/.disableDesktop
  1788.  
  1789.    You may also have to remove the .desktop-<hostname> directory as
  1790.    well as 4Dwm looks in there for a 4Dwmsession file which it uses
  1791.    for a guide to redisplay windows left open from the last session.
  1792.  
  1793.    Method 2 works ONLY if you have the original IRIX 5.2 xdm Xsession
  1794.    file, which contains the following code chunk:
  1795.  
  1796.    if /etc/chkconfig desktop ;
  1797.    then
  1798.            if [ -x $0.dt -a \! -f $HOME/.disableDesktop ]
  1799.            then
  1800.                    exec $0.dt $*
  1801.            fi
  1802.    fi
  1803.  
  1804. You may also want to set the resources
  1805.  
  1806.    4Dwm*SG_manageSession: False
  1807.    4Dwm*SG_useBackgrounds: False
  1808.  
  1809. ------------------------------
  1810.  
  1811. Subject: + -65- Does the IRIX 5.2 Magic user environment display on an X
  1812.                 terminal?
  1813. Date: 30 Apr 94 00:00:01 EST
  1814.  
  1815. Joel Tesler <joel@jellotrees.esd.sgi.com> says:
  1816.  
  1817. Although it is not officially supported, it should work in IRIX 5.2 MR
  1818. (but not in the beta release).  There are some glitches.  You probably
  1819. don't have to set the environment variable _NO_DESKTOP_IMAGES, but try
  1820. it if you have problems.  There should be no reason to set
  1821. _SGI_NO_REMOTE_GL.
  1822.  
  1823.  
  1824. ------------------------------
  1825.  
  1826. End of sgi/faq/graphics Digest
  1827. ******************************
  1828. -- 
  1829. The SGI FAQ group                                sgi-faq@viz.tamu.edu
  1830. Finger us for info on the SGI FAQs, or look in viz.tamu.edu:/pub/sgi.
  1831.  
  1832.